package com.chukun.interview.feature.inf.impl;

import com.chukun.interview.feature.inf.base.Shape;

/**
 * 设计成一个只读对象，不支持修改，不可变对象
 */
public class Circle03 implements Shape {

    private final double radius;

    public Circle03(double radius) {
        this.radius = radius;
    }

    @Override
    public  double getArea() {
        return Math.PI * radius * radius;
    }
}